import request from '@/utils/request'

const AuthLoginByAccount = 'wx/auth/login' // 账号登录
export function authLoginByAccount (data) {
  return request({
    url: AuthLoginByAccount,
    method: 'post',
    data
  })
}
const AuthLogout = 'wx/auth/logout' // 账号登出
export function authLogout () {
  return request({
    url: AuthLogout,
    method: 'post'
  })
}
const AuthRegisterCaptcha = 'wx/auth/regCaptcha' // 注册验证码
export function authRegisterCaptcha (data) {
  return request({
    url: AuthRegisterCaptcha,
    method: 'post',
    data
  })
}
const AuthRegister = 'wx/auth/register' // 账号注册
export function authRegister (data) {
  return request({
    url: AuthRegister,
    method: 'post',
    data
  })
}

const AddressList = 'wx/address/list' // 收货地址列表
export function addressList (query) {
  return request({
    url: AddressList,
    method: 'get',
    params: query
  })
}
const AddressDetail = 'wx/address/detail' // 收货地址详情
export function addressDetail (query) {
  return request({
    url: AddressDetail,
    method: 'get',
    params: query
  })
}
const AddressSave = 'wx/address/save' // 保存收货地址
export function addressSave (data) {
  return request({
    url: AddressSave,
    method: 'post',
    data
  })
}
const AddressDelete = 'wx/address/delete' // 保存收货地址
export function addressDelete (data) {
  return request({
    url: AddressDelete,
    method: 'post',
    data
  })
}
const FootprintList = 'wx/footprint/list' // 足迹列表
export function footprintList (query) {
  return request({
    url: FootprintList,
    method: 'get',
    params: query
  })
}
const FootprintDelete = 'wx/footprint/delete' // 删除足迹
export function footprintDelete (data) {
  return request({
    url: FootprintDelete,
    method: 'post',
    data
  })
}
